<#assign pageTitle = "直播列表" />
<#assign pageHeader>
	<script type="text/javascript">
		var channelId = ${courseQuery.channelId!};
		var categoryId = ${courseQuery.categoryId!};
		var teacherId = ${courseQuery.teacherId!};
		var memberTypeId = ${courseQuery.memberTypeId!};
		var orderBy = ${courseQuery.orderBy!};
		var isFree = ${courseQuery.isFree!};
		var isLiving = ${courseQuery.isLiving!};
		var sellType = "LIVE";
		var currentPage = ${page.currentPage};
		var totalPage = ${totalPages};
	</script>
</#assign>
<#assign pageContent>
	<div id="aCoursesList" class="bg-fa of">
		<section class="container">
			<section class="path-wrap txtOf hLh30">
				<a class="c-999 fsize14" href="/live/index.html" title="">直播首页</a>
				\
				<span class="c-333 fsize14">直播列表</span>
			</section>
			<section class="c-sort-box">
				<section class="c-s-dl coures-option">
					<dl> 
						<dt> <span class="c-333 fsize16">按分类</span> </dt>
						<dd class="c-s-dl-li"> 
							<ul class="clearfix"> 
									<li <#if courseQuery.categoryId==0>class="current"</#if>><a title="全部" href="javascript:setCategoryId(0)">全部</a></li>
									<#list categoryRoots as category>
										<li><a title="${category.categoryName}" href="javascript:setCategoryId(${category.categoryId})">${category.categoryName}</a></li>
									</#list>
							</ul>
							<aside class="c-s-more">
								<a href="javascript: void(0)" title="" class="fsize14 c-master icon-gd">&nbsp;</a>
								<div class="m-a-box">
									<section class="m-a-b-inf">
										<div class="DT-arrow">
											<em>◆</em>
											<span>◆</span>
										</div>
										<div class="m-a-b-more"></div>
									</section>
								</div>
							</aside>
						</dd> 
					</dl>
					<#if categoryChildren?? &&(categoryChildren?size >0) >
						<dl class="ejdl-box live-ejdl-b">
							<dt>
								<span class="c-999 fsize14 dis txtOf">${categoryParentName}：</span>
							</dt>
							<dd class="c-s-dl-li">
								<ul class="clearfix">
									<#list categoryChildren as category>
										<li <#if courseQuery.categoryId==category.categoryId>class="current"</#if>><a title="${category.categoryName}" href="javascript:setCategoryId(${category.categoryId})">${category.categoryName}</a></li>
									</#list>
								</ul>
							</dd>
						</dl>
					</#if>
					<#if serviceSwitch.member=='ON'>
						<dl class="teach-yjdl">
							<dt> <span class="c-333 fsize16">按会员</span> </dt>
							<dd class="c-s-dl-li">
								<ul class="clearfix">
									<li <#if courseQuery.memberTypeId==0|| !courseQuery.memberTypeId??>class="current"</#if>><a title="全部" href="javascript:setMemberType(0)">全部</a></li>
									<#list memberTypeList as memberType>
										<li <#if memberType.id==courseQuery.memberTypeId>class="current"</#if>><a title="${memberType.title}" href="javascript:setMemberType(${memberType.id})">${memberType.title}</a></li>
									</#list>
								</ul>
							</dd>
						</dl>
					</#if>
					<div class="clear"></div> 
				</section>
				<div class="clearfix">
					<div class="c-sort-box c-sort-box-live">
						<section class="mobile-option-box bg-fff">
							<ul class="mo-op-titlist clearfix">
								<li class="kcfl-li">
									<a href="javascript:void (0)">
										<tt>
											<#if category??>
												${category.categoryName!}
												<#else>
													课程专业
											</#if>
										</tt>
										<em class="icon16 m-o-t-fl-ico">&nbsp;</em>
									</a>
								</li>
								<li class="sxtj-li">
									<a href="javascript:void (0)">
										<tt>
											筛选条件
										</tt>
										<em class="icon16 m-o-t-fl-ico">&nbsp;</em>
									</a>
								</li>
							</ul>
							<section class="kczy-box m-o-b-se pr">
								<ul class="kczy-list-a" id="kczy-a">
									<li class="<#if courseQuery.categoryId==0>current</#if> allSubject">
										<a onclick="setCategoryId(0)" title="全部" href="javascript:void(0)">
											全部
										</a>
									</li>
									<#list mobileCategories as category>
										<#if category.parentId==0>
											<li <#if courseQuery.categoryId==category.categoryId || categoryParentId ==category.categoryId>class="current"</#if>>
												<a title="${category.categoryName}" href="javascript:setCategoryId(${category.categoryId})">${category.categoryName}
												</a>
											</li>
										</#if>
									</#list>
								</ul>
								<ul class="kczy-list-b" id="kczy-b">
									<#list mobileCategories as category>
										<#if category.parentId!=0>
											<li class="childCategory subject${category.parentId} <#if courseQuery.categoryId==category.categoryId> current</#if> "
													<#if category.parentId != categoryParent.parentId!-1> style="display:none"</#if>>
												<a title="${category.categoryName}" href="javascript:setCategoryId(${category.categoryId})">${category.categoryName}</a>
											</li>
										</#if>
									</#list>
								</ul>
							</section>
							<section class="sxtj-box m-o-b-se">
								<div class="fg-line fg-line-fist">
									<p class="fg-txt">状态</p>
									<ul class="sxtj-list clearfix">
										<li class="check condition2 <#if courseQuery.isLiving! == 1>current</#if>" onclick="setIsLiving(this)">
											<a href="javascript:void (0)">正在直播</a>
										</li>
										<li class="check condition2 <#if courseQuery.isFree! == 1>current</#if>" onclick="setIsFree(this)">
											<a href="javascript:void (0)">免费直播</a>
										</li>
									</ul>
								</div>
								<div class="fg-line">
									<p class="fg-txt">价格与排序</p>
									<ul class="sxtj-list clearfix">
										<li class="check condition3 <#if courseQuery.orderBy==0>current</#if>" onclick="setOrderBy(0)">
											<a href="javascript:void (0)">最新</a>
										</li>
										<li class="check condition3 <#if courseQuery.orderBy==1>current</#if>" onclick="setOrderBy(1)">
											<a href="javascript:void (0)">热门</a>
										</li>
										<li class="check condition3 <#if courseQuery.orderBy==4>current</#if>" onclick="setOrderBy(4)">
											<a href="javascript:void (0)">价格从高到低</a>
										</li>
										<li class="check condition3 <#if courseQuery.orderBy==3>current</#if>" onclick="setOrderBy(3)">
											<a href="javascript:void (0)">价格从低到高</a>
										</li>
									</ul>
								</div>
								<#if serviceSwitch.member=='ON'>
									<div class="fg-line">
										<p class="fg-txt">会员分类</p>
										<ul class="sxtj-list clearfix">
											<li <#if courseQuery.memberTypeId==0 || !courseQuery.memberTypeId??>class="current"</#if>><a title="全部" href="javascript:setMemberType(0)">全部</a></li>
											<#list memberTypeList as memberType>
												<li <#if memberType.id==courseQuery.memberTypeId>class="current"</#if>><a title="${memberType.title}" href="javascript:setMemberType(${memberType.id})">${memberType.title}</a></li>
											</#list>
										</ul>
									</div>
								</#if>
							</section>
							<div class="mo-op-body"></div>
						</section>
						<section class="live-l-new-cx">
							<div class="js-wrap clearfix">
								<section class="fl"> 
									<ol class="js-tap clearfix">
											<li <#if courseQuery.orderBy==0>class="current bg-orange"</#if>><a title="最新" onclick="submitForm(3,'0')" href="javascript:void(0)">最新</a></li>
											<li <#if courseQuery.orderBy==1>class="current bg-orange"</#if>><a title="热门" onclick="submitForm(3,'1')" href="javascript:void(0)">热门</a></li>
											<li <#if courseQuery.orderBy==3||courseQuery.orderBy==4>class="current bg-orange"</#if>><a title="价格" onclick="submitForm(4,'<#if courseQuery.orderBy==3>4<#else>3</#if>')" href="javascript:void(0)">价格<span><#if courseQuery.orderBy==4>↑</#if><#if courseQuery.orderBy==3>↓</#if></span></a></li>
									</ol>
								</section>
								<article class="fr">
									<label onclick="setIsLiving(this)" class="c-kcfl <#if courseQuery.isLiving! == 1>check</#if> ml20">
										<em class="icon14 c-chb-ico">
											<input type="checkbox" class="chen-c-fl">
										</em>
										<tt class="vam fsize14 c-666 f-fM">正在直播</tt>
									</label>
									<label onclick="setIsFree(this)" class="c-kcfl <#if courseQuery.isFree! == 1>check</#if>  ml20">
										<em class="icon14 c-chb-ico">
											<input value="true" type="checkbox" class="chen-c-fl">
										</em>
										<tt class="vam fsize14 c-666 f-fM">免费直播</tt>
									</label>
								</article>
							</div>
							<div class="couresnew-big bg-fff">
								<div class="comm-course-list of co-lv-list">
									<#if courseList??>
										<ul class="of">
											<#list courseList as course>
												<li <#if (.now?long - course.liveEndTime?datetime?long) < 0 >class="current"</#if> >
													<div class="cc-l-wrap">
														<section class="course-img">
															<a href="/course/view/${course.courseId}.html">
																<#if course.cover??>
																	<img src="${staticSite}${course.cover}"  class="img-responsive" alt="${course.courseName }">
																<#else>
																	<img src="/static/qdxwx/img/coures.gif" class="img-responsive" alt="${course.courseName }">
																</#if>
															</a>
															<div class="l-pic-name">
																<h3 class="hLh30 txtOf c-fff">
																	<a href="/course/view/${course.courseId}.html" title="${course.courseName }" class="course-title fsize16 c-fff">${course.courseName }</a>
																</h3>
															</div>
														</section>
														<div class="coure-bg-g">
															<section class="hLh20 of mt5">
																<span class="f-fM c-666 fsize14">
																	<#if  course.courseNodeList[0].liveBeginTime??>
																		${course.courseNodeList[0].liveBeginTime?string("yyyy-MM-dd HH:mm")} 开播
																	<#else >
																		没有直播
																	</#if>
																</span>
															</section>
															<section class="mt10 hLh20 of">
																<#if course.price?string=='0.00'>
																	<span class="fr"><tt class="c-green fsize12 f-fA">免费</tt></span>
																<#else>
																	<span class="fr"><tt class="c-master fsize14 f-fM">￥${course.price/100}</tt></span>
																</#if>
																<span class="fl lv-img-pic">
																	<a class="live-zt-ing" href="/course/view/${course.courseId}.html">
																		<#if course.courseNodeList[0].liveBeginTime?datetime lt .now?datetime && course.courseNodeList[0].liveEndTime?datetime gt .now?datetime><img src="/static/qdxwx/img/live-ing.gif"></#if>
																		<#if course.courseNodeList[0].liveBeginTime?datetime gt .now?datetime && course.courseNodeList[0].liveEndTime?datetime gt .now?datetime><img src="/static/qdxwx/img/live-wks.png"></#if>
																		<#if course.courseNodeList[0].liveEndTime?datetime lt .now?datetime><img src="/static/qdxwx/img/live-over.png"></#if>
																	</a>
																</span>
															</section>
														</div>
													</div>
												</li>
											</#list>
										</ul>
										<!-- 公共分页 开始 -->
										<div class="paging" id="showPages"></div>
										<!-- 公共分页 结束 -->
										<#else>
											<section class="no-data-wrap">
												<em class="icon30 no-data-ico">&nbsp;</em> <span class="c-666 fsize14 ml10 vam">没有相关数据，小编正在努力整理中...</span>
											</section>
									</#if>
								</div>
							</div>
						</section>
					</div>
				</div>
			</section>
		</section>
	</div>
</#assign>
<#assign pageFooter>
	<script type="text/javascript" src="/static/js/page.js"></script>
	<script type="text/javascript" src="/static/js/course/course-list.js"></script>
</#assign>
<#include "../layouts/layout.ftl">